﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSM.Lib
{
	public class UserInfo
	{
		public long UserID;
		public string Email;
		public string TrueName;
		public string NickName;
		public DateTime Birthday;
		public Gender Gender;
		private Int32 _UserType;
		public Int32 UsrType { get { return _UserType; } set { _UserType = value; } }
		private Int32 _UserState;
		public Int32 UsrState { get { return _UserState; } set { _UserState = value; } }
		public Int32 ClientVer;

		/// <summary>
		/// 用户是否已经被冻结
		/// </summary>
		public bool IsFreeze
		{
			get { return (_UserState & (int)UserState.Freeze) == (int)UserState.Freeze; }
			set { _UserState |= (int)UserState.Freeze; }
		}

		/// <summary>
		/// 用户是否已经注销
		/// </summary>
		public bool IsLogoff
		{
			get { return (_UserState & (int)UserState.LogOff) == (int)UserState.LogOff; }
			set { _UserState |= (int)UserState.LogOff; }
		}
	}
}
